package com.zhaoxi.project.wms.service.impl;

import java.util.List;
import com.zhaoxi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhaoxi.project.wms.mapper.MesScheduleLineMapper;
import com.zhaoxi.project.wms.domain.MesScheduleLine;

/**
 * 计划排程Service业务层处理
 * 
 * @author zhaoxi
 * @date 2023-11-10
 */
@Service
public class MesScheduleLineServiceImpl
{
    @Autowired
    private MesScheduleLineMapper mesScheduleLineMapper;

    /**
     * 查询计划排程
     * 
     * @param lineId 计划排程主键
     * @return 计划排程
     */
    
    public MesScheduleLine selectMesScheduleLineByLineId(Long lineId)
    {
        return mesScheduleLineMapper.selectMesScheduleLineByLineId(lineId);
    }

    /**
     * 查询计划排程列表
     * 
     * @param mesScheduleLine 计划排程
     * @return 计划排程
     */
    
    public List<MesScheduleLine> selectMesScheduleLineList(MesScheduleLine mesScheduleLine)
    {
        return mesScheduleLineMapper.selectMesScheduleLineList(mesScheduleLine);
    }

    /**
     * 新增计划排程
     * 
     * @param mesScheduleLine 计划排程
     * @return 结果
     */
    
    public int insertMesScheduleLine(MesScheduleLine mesScheduleLine)
    {
        mesScheduleLine.setCreateTime(DateUtils.getNowDate());
        return mesScheduleLineMapper.insertMesScheduleLine(mesScheduleLine);
    }

    /**
     * 修改计划排程
     * 
     * @param mesScheduleLine 计划排程
     * @return 结果
     */
    
    public int updateMesScheduleLine(MesScheduleLine mesScheduleLine)
    {
        mesScheduleLine.setUpdateTime(DateUtils.getNowDate());
        return mesScheduleLineMapper.updateMesScheduleLine(mesScheduleLine);
    }

    /**
     * 批量删除计划排程
     * 
     * @param lineIds 需要删除的计划排程主键
     * @return 结果
     */
    
    public int deleteMesScheduleLineByLineIds(Long[] lineIds)
    {
        return mesScheduleLineMapper.deleteMesScheduleLineByLineIds(lineIds);
    }

    /**
     * 删除计划排程信息
     * 
     * @param lineId 计划排程主键
     * @return 结果
     */
    
    public int deleteMesScheduleLineByLineId(Long lineId)
    {
        return mesScheduleLineMapper.deleteMesScheduleLineByLineId(lineId);
    }
}
